1. Field of the Invention
This disclosure relates generally to communication of packets within a network. More particularly but not exclusively, the present disclosure relates to techniques for handling fragmented packets, such as the handling of Internet protocol (IP) fragmentation packets within a communication network.
2. Description of the Related Art
The most basic unit of data transmission in Transmission Control Protocol/Internet Protocol (TCP/IP) or Internet networking is a packet (sometimes referred to as a “datagram”). A packet is a small piece of information coded at a source, marked with the source address (SA), and directed to a destination address (DA). Traditional IP networks and systems rely exclusively on IP addressing to route the packet from one IP network to another, until arriving at the destination address specified in the packet. Routers, switches (such as Ethernet switches), hubs, or other network devices operate to forward packets to their ultimate destination.
IP fragmentation of a packet is generally performed when the packet originates from a network that allows a large packet size, and then the packet must traverse to another network that limits packets to a smaller size in order to reach their destination. Routers typically perform the fragmentation of large packets, while reassembly of fragments back into the original packet is performed at the destination (or sometimes at an intermediate location).
Fragmentation involves the breaking up of a packet into an almost arbitrary number of fragments that can be later reassembled. The SA, DA, identification, total length, fragment offset fields, and other information in an IP packet header are used for fragmentation and reassembly. The receiving destination uses an IP identifier in the identification field to identify and match fragments that belong to the same packet, while the fragment offset fields are used to identify the position of each fragment in the original packet. This header information, along with other header information, provides sufficient information to reassemble packets. See generally Information Services Institute, Internet Protocol: DARPA Internet Program Protocol Specification, September 1981.
When dealing with IP-fragmented packets, the only fragment that has sufficient information that can be utilized by Layer 4-Layer 7 (L4-L7) features (at the receiving station or at intermediate locations, such as at a switch) is the head fragment that has all of the header information. The trailing fragments, including fragments that collectively contain the pieces of the original packet data, are generally useless for purposes of L4-L7 operations. Therefore, processing all of these packets with the L4-L7 features amounts to wasting precious processor cycles. Furthermore, in fragmentation schemes where the header information is duplicated into all of the individual fragments (as compared to fragmentation schemes where only one fragment generally has most of the original header information), processing all of the individual fragments with the L4-L7 features also amounts to a redundant and an unnecessary waste of processor cycles.
As an illustration of this redundancy, suppose an IP packet “P” is fragmented into n+1 fragments f0, f1, f, . . . fn. The only fragment that will have any utility for the L4-L7 features is the head fragment f0. In the worst case scenario, the head fragment f0 is received last by a switch (or by some other network component in the communication path)—however, by the time the head fragment f0 is received, the switch would already have forwarded the previous n fragments to the L4-L7 features by then, and the L4-L7 features (whether at the switch, at the receiving station, or at an intermediate location) would already have processed these n fragments before receiving the head fragment f0. The L4-L7 features, only after processing these n fragments, would then realize that these are fragments of an original packet and that there is not sufficient useful information that can be obtained therefrom, and further would have to save these n fragments until the head fragment f0 is finally received and processed. However, as one can note, the L4-L7 features performed substantially unnecessary processing on the n non-head fragments prior to receipt of the head fragment f0.